import axios from 'axios'

export function uploadImg(action,image) {
	return new Promise((resole, reject) => {
		const formData = new FormData();
		formData.append('image', image)
		axios.post(action, formData, {
			headers: {
				"Content-Type": 'multipart/form-data'
			}
		}).then(res => {
			resole(res)
		}).catch(err => {
			reject(err)
		})
	})

}
